package cn.javass.dp.visitor.example3;

public class Client {
    public static void main(String[] args) {
        ObjectStructure os = new ObjectStructure();
        Customer cm1 = new EnterpriseCustomer();
        cm1.setName("ABC集团");
        os.addElement(cm1);

        Customer cm2 = new EnterpriseCustomer();
        cm2.setName("DEF集团");
        os.addElement(cm2);

        Customer cm3 = new PersonalCustomer();
        cm3.setName("小明");
        os.addElement(cm3);

        //ServiceRequestVisitor visitor = new ServiceRequestVisitor();
        PredilectionAnalyzeVisitor visitor = new PredilectionAnalyzeVisitor();

        os.handleRequest(visitor);



    }
}
